﻿using EAS.Common.Players;
using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAS.Content.Items
{
    [AutoloadEquip(EquipType.HandsOff, EquipType.HandsOn)]
    public class FrozenGloves : ModItem
    {

        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }
        public override void SetDefaults()
        {
            Item.rare = ItemRarityID.Lime;
            Item.value = 300000;
            Item.accessory = true;
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.kbGlove = true;
            player.autoReuseGlove = true;
            player.meleeScaleGlove = true;
            player.GetAttackSpeed(DamageClass.Melee) += 0.12f;
            player.GetDamage(DamageClass.Melee) += 0.12f;
            player.GetModPlayer<AccPlayer>().frozenStone = true;
        }
        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddIngredient(ItemID.MechanicalGlove, 1);
            modRecipe.AddIngredient(ModContent.ItemType<FrozenStone>(), 1);
            modRecipe.AddTile(TileID.TinkerersWorkbench);
            modRecipe.Register();
        }
    }

}
